#ifndef BOIDAIRCRAFT_H
#define BOIDAIRCRAFT_H

#include "BoidBase.h"

/**
 * Class BoidAirCraft
 */
class BoidAirCraft : public BoidBase
{
protected:
	/// velocity of space ship.
	Ogre::Vector3 mVelocity;

	/// maximum thrust magnitute.
	float mThrust;

	/// maximum lift magnitute we can generate per velocity unit.
	float mLift;

	/// basic drag magnitute.
	/**
		uses simple calculation of the craft's angle.
		If craft is facing velocity, it's at min drag.
		If craft is 90 degree away from velocity, we use max drag.
	*/
	float mMinDragOffset;
	float mMaxDrag;

	float mGravity;

	Ogre::Radian mMaxPitch;
	Ogre::Radian mMaxRoll;

public:
	/// Constructor
	BoidAirCraft(
		OgreOde::Body *mBody, float thrust, float lift,
		float minDrag, float maxDrag, float gravity,
		const Ogre::Radian& maxPitch, const Ogre::Radian& maxRoll);

	/**
	 * This function returns the velocity of this boid
		\return the velocity of this boid
	 */
	const Ogre::Vector3& getVelocity() const { return mVelocity; }

	/// steer boid base on desired steering vector
	void steerBoid(const Ogre::Vector3& desiredVector);
};

typedef Ogre::SharedPtr<BoidAirCraft> BoidAirCraftPtr;

#endif // BOIDAIRCRAFT_H
